<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>弹出对话框</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="../../../../assets/css/reset.css"/>

    <link rel="stylesheet" href="../../../../assets/css/examples.css"/>

</head>
<body>
<h1>
    弹出对话框（Dialog）
</h1>

<ul>
    <li>
        <a href="javascript:void(0)" id="tip">弱提示（tip）</a>
    </li>
    <li>
        <a href="javascript:void(0)" id="alert">警告窗口（alert）</a>
    </li>
    <li>
        <a href="javascript:void(0)" id="confirm">确认窗口（confirm）</a>
    </li>
</ul>

<script  src="../../../../../core/$$.js"></script>
<script  src="../../../../../core/libs/zepto/zepto.min.js"></script>
<script  src="../../../../../core/libs/zepto/selector.js"></script>
<script  src="../../../../../core/libs/zepto/touch.js"></script>
<script  src="../../../../../core/libs/underscore-min.js"></script>
<script  src="../../../../../core/libs/oop.js"></script>
<script  src="../../../../../core/extend/prototype.js"></script>
<script  src="../../../../../core/extend/function.js"></script>
<script  src="../../../../../core/native/platformAdapter.js"></script>
<script  src="../../../../../core/native/api.js"></script>
<script  src="../../../../../core/native/eventListener.js"></script>
<script  src="../../../classes/XX.js"></script>
<script  src="../../../../config/url/dev.js"></script>

<script type="text/javascript">
    $('#tip').on('tap', function () {
        $$.Native.tip({
            text: '交易成功。'
        });
    });

    $('#alert').on('tap', function () {
        $$.Native.alert({
            text: '交易即将开始。',
            btnText: '开始交易',
            btnCallback: function () {
                alert('触发回调');
            }
        });
    });

    $('#confirm').on('tap', function () {
        $$.Native.confirm({
            text: '是否要进行交易？',
            leftBtnText: '是',
            leftBtnCallback: function () {
                alert('触发回调（是）');
            },
            rightBtnText: '否',
            rightBtnCallback: function () {
                alert('触发回调（否）');
            }
        });
    });
</script>
</body>
</html>